<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>审核列表</h2>
    </div>
    <div class="cf">
        <div class="fl">
            <button class="btn ajax-post" url="{:U('Check/check_status',array('check_status'=>'2'))}" target-form="ids">审核通过</button>
            <button class="btn ajax-post" url="{:U('Check/check_status',array('check_status'=>'3'))}" target-form="ids">审核不通过</button>
        </div>
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <form action="/Admin/Usermember/index" id="form1" method="get">
                <div class="sleft">
                    <!--<input type="text" name="typeid" class="search-input" value="" placeholder="文件分类">-->
                    <select class="search-input" name="user_type">
                        <option value="">请选择分组</option>
                        <volist name="userfz" id="typelist">
                            <option value="{$typelist.id}" <?php if($_GET['user_type']==$typelist[id]){echo 'selected';} ?>>{$typelist.title}</option>
                        </volist>
                    </select>
                    <select class="search-input" name="check_status">
                        <option value="">请选择审核状态</option>
                        <option value="wsh" <?php if($_GET['check_status']=='wsh'){echo 'selected';} ?>>未审核</option>
                        <option value="1" <?php if($_GET['check_status']==1){echo 'selected';} ?>>审核成功</option>
                        <option value="2" <?php if($_GET['check_status']==2){echo 'selected';} ?>>审核失败</option>

                    </select>
                    <input type="text" name="title" class="search-input" value="{$get[title]}" placeholder="标题">
                    <a class="sch-btn" href="javascript:;" id="search" ><i class="btn-search"></i></a>
                </div>
            </form>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table class="">
            <thead>
            <tr>
                <th class="row-selected row-selected" ><input class="check-all" type="checkbox"/></th>
                <th class="" >编号</th>
                <th class="" >企业名称</th>
                <th class="" >营业执照</th>
                <th class="" >商铺名称</th>
                <th class="" >商铺logo</th>
                <th class="" >企业地址</th>
                <th class="" >法人身份证</th>
                <th class="" >状态</th>
                <th class="" >操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="list">
                <volist name="list" id="vo">
                    <tr>
                        <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
                        <td>{$vo.id} </td>
                        <td>{$vo.company_name}</td>
                        <td>{$vo.business_license}</td>
                        <td>{$vo.shop_name}</td>
                        <td>{$vo.shop_logo}</td>
                        <td>{$vo.company_address}</td>
                        <td>{$vo.id_card}</td>
                        <td><if condition="$vo[check_status] eq 1">待审核<elseif condition="$vo[check_status] eq 2" />审核通过<else/>审核不通过</if></td>
                        <td><eq name="vo.check_status" value="1">
                                <a href="{:U('Check/check_status?check_status=2&id='.$vo['id'])}" class="ajax-get">审核通过</a>
                                <a href="{:U('Check/check_status?check_status=3&id='.$vo['id'])}" class="ajax-get">审核不通过</a>
                            <else/>
                                已审核
                            </eq>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script src="__STATIC__/layer/layer.js"></script>

    <script type="text/javascript">
        //搜索功能
        $("#search").click(function(){
            $("#form1").submit();
        });
        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        highlight_subnav('{:U('Check/index')}');
    </script>
</block>
